<?php 
require_once ('lib/nusoap.php'); 

//Tak the value of the post parametre 
//$your_username = array( 'your_username' => $_POST['username']);
//$your_username_string = serialize($your_username);
$your_username_string = $_POST['username'];

//create connection with db & object
include("../includes/setup.php");
$setup = new setup();		

//select the date for this specific user
$the_query = $setup->qry("SELECT user_date FROM USERS WHERE user_name='".$your_username_string."';");
$row = mysql_fetch_array($the_query);

//echo $row['user_date'];
$param = array( 'your_date' => $row['user_date']);


//Create object that referer a web services 
$client = new nusoap_client('http://192.185.116.17/~wwwmsc/WebServiceSOAP/server.php'); 

//Call a function at server and send parameters too 
$response = $client->call('get_message',$param); 

//Process result 
if($client->fault) 
{ 
echo "FAULT: <p>Code: (".$client->faultcode."</p>"; 
echo "String: ".$client->faultstring; 
} 
else 
{ 
echo $response; 
} 
?> 